<script type="text/javascript">
function getfav()
{	
	var url = '<{$config.weburl}>/ajax_back_end.php';
	var myurl='<{$config.weburl}>/?m=offer%26s=offer_detail%26id=<{$smarty.get.id}>';
	var u='<{$smarty.cookies.USER}>';
	if(u=='')
	{
	  alert('<{$lang.no_logo}>');
	  window.location.href='<{$config.weburl}>/login.php?forward='+myurl;
	  return false;
	}
	var fu='<{$smarty.get.id}>';
 	var typ='2';
	var ttil='<{$de.title|regex_replace:"/[\r\t\n]/":""}>';
	var mpic='<{$config.weburl}>/uploadfile/zsimg/<{$de.showimg}>.jpg';
	var des='<{$de.title|strip_tags}>';
    var pars = 'user='+u+'&fid='+fu+'&type='+typ+'&title='+ttil+'&url='+myurl+'&des='+des+'&picurl='+mpic;
	var myAjax = new Ajax.Request(url,{method: 'post', parameters: pars, onComplete: showResponse});
	function showResponse(originalRequest)
	{
	    if(originalRequest.responseText>1)
	       alert('<{$lang.fav_ok}>');
		else if (originalRequest.responseText>0)
	       alert('<{$lang.fav_isbing}>');
		else
	       alert('<{$lang.error}>');
	}
}
function seebig(id)
{
    $('imgmove').innerHTML='<a href="<{$config.weburl}>/uploadfile/zsimg/'+id+'.jpg" target="_blank">'+
	'<img id="img'+id+'" border="0" src="<{$config.weburl}>/uploadfile/zsimg/'+id+'.jpg" ></a>';
	if($('img'+id).height>$('img'+id).width)
		$('img'+id).height=250;
	else
		$('img'+id).width=250;
}
var weburl='<{$config.weburl}>';
function copyToClipboard(txt)
{
  try{
	  window.clipboardData.setData("Text",txt);  
	  alert('<{$lang.copysuc}>'); 
  }
  catch(e){alert('<{$lang.noace}>');}
}
</script>
<script src="<{$config.weburl}>/script/my_lightbox.js" language="javascript"></script>
<div class="menu_bottom L1">				
    <div class="headtop_L">
        <{$lang.you_here}>&raquo;<a href='<{$config.weburl}>/'><{$lang.home}></a>&raquo;<a href="<{$config.weburl}>/?m=offer"><{$lang.shop}></a> &raquo;<{$guide}>
    </div>
    <div class="headtop_R"></div>		
</div>
<div id="mainbody1" class="m1">
<div class="leftbar">
	<div class="title4"><div class="title_left2 L2"><{$lang.pro_det}></div></div>    
    <div class="content4">
	<div class="newstitle"><{$de.offertype}><{$de.title}></div> 
    <div class="newstime">【<{insert name="label" type="statics" temp='statics_default' ctype=2 id=$de.id}>】</div>
			<div class="propic">
			    <div id="imgmove" class="imgmove">       						 
                     <{assign var="img" value=$de.pic.0}>
                     <{html_image file=uploadfile/zsimg/$img.jpg width=250 alt=$list.title}>
				 </div>
                 
				 <div id="infopic" class="small_pic">
				  <{foreach item=pic key=num from=$de.pic}>
						<{if $pic&&$num<4}>
						<img onMouseOver="seebig('<{$pic}>')" style="cursor:pointer" src="<{$config.weburl}>/uploadfile/zsimg/size_small/<{$pic}>.jpg" border=0 width="45" height="40">
						<{/if}>
				 <{/foreach}>
				</div>
                <div style="float:left; padding:8px;overflow:hidden;">
                    <a href="javascript:alertWin('<{$lang.share}>','<br><span style=width:80px;><{$lang.purl}></span><input id=textfield type=text size=45 value=<{$config.weburl}>/?m=offer&s=offer_detail&id=<{$de.id}>>
                    <div style=width:340px;padding-left:60px;text-align:left;><br><button onclick=copyToClipboard(\'<{$config.weburl}>/?m=offer&s=offer_detail&id=<{$de.id}>\')><{$lang.copysend}></button></div>',400,100,'');"><img src="<{$config.weburl}>/image/<{$config.temp}>/add_to_share.png" /></a>
                    <a href="javascript:getfav();"><img src="<{$config.weburl}>/image/<{$config.temp}>/add_to_fav.png" /></a>
                </div>
			</div>
			<div class="proinfo">
			<table width="330" border="0">
            	<tr>
					 <td class="pro_text"><{$lang.price}></td>
					 <td><{$config.money}> <span style="color:#FF5500; font-size:24px;"><{$de.price|number_format:2}></span> /<{$de.priceDes}></td>
				 </tr>
                 <tr>
					 <td class="pro_text"><{$lang.valid_time}></td>
					 <td><{$de.valid_time}></td>
				 </tr>
                 <tr>
					 <td class="pro_text"><{$lang.pro_city}></td>
					 <td><{$cominfo.province}><{$cominfo.city}></td>
				 </tr>
                 <tr>
					 <td class="pro_text"><{$lang.ptime}></td>
					 <td><{$de.uptime|date_format}></td>
				 </tr>
				<tr>
				 <td class="pro_text"><{$lang.trde_type}></td>
				 <td><{$de.offer_type}></td>
				 </tr>
                <tr>
				 <td class="pro_text"><{$lang.summary}></td>
				 <td><{$de.con}></td>
				 </tr>
				 <tr>
				 <td colspan="2">
                 <a href="<{$config.weburl}>/shop.php?uid=<{$de.userid}>&action=mail&tid=<{$de.id}>&contype=2">
                 <img src="<{$config.weburl}>/image/<{$config.temp}>/sendmail.gif" />
                 </a>
                 </td>
				 </tr>
			</table>
			</div>
            <div class="clear"></div>
			<div class="prodetail" id="productdetail">
				<div class="pro_int"><{$lang.pro_det}></div>
					<script src='<{$config.weburl}>/api/ad.php?id=17&catid=<{$smarty.get.id}>&sname=<{$sname}>'></script>
					<{$de.detail}>  
				</div>
			<br/>
			<{insert name="label" type="comment" ctype=2 cid=$smarty.get.id temp="comment_default" }>
            </div>
            <div class="bottom4"></div>
			
			<div class="m1">
			<div class="title4">
            	<h2 style="float:left; margin-left:20px;"><{$lang.com_newpro}></h2>
                <span style="float:right; margin-right:20px;"><a href="<{$config.weburl}>/?m=offer&s=offer_list&id=<{$de.catid}>"><{$lang.more}></a>&nbsp;</span>
            </div>
			<div class="sameoffer content4">
            <table width="100%" border="0" cellspacing="5" cellpadding="0" style="text-align:left;">
              <tr>
              <{foreach item=slist key=num from=$reloffer}>
                <td height="22">
                <img src='<{$config.weburl}>/image/<{$config.temp}>/offer_<{$slist.type}>.gif' />
                <a href="<{geturl type='offer_detail' user=$slist.user uid=$slist.userid tid=$slist.id m='offer'}>">
                <{$slist.title|truncate:44}>
                </a>
                </td>
                <{if ($num+1)%2==0}></tr><tr><{/if}>
              <{/foreach}>
              </tr>
            </table>	
			</div>
			</div>
		</div>




<div class="rightbar">
 <div class="right1">
	<div class="sectitle" ><div class="title_left1 L2"><{$lang.seller_det}></div></div>
	 
	<div class="seccon">
	<{if $de.view_right==false}>
		<li><{$lang.no_right}></li>
	<{else}>
	<table width="100%" border="0" style="margin-left:5px;"cellspacing="0">
	  <tr height="22">
		<td colspan="2">
		<b><a href="<{geturl type='' user=$cominfo.user uid=$cominfo.userid}>"><{$cominfo.company}></a></b>
		</td>
	  </tr>
	   <tr height="22">
		<td colspan="2"> 
			<{if $cominfo.business}>
				 <img src="<{$config.weburl}>/image/default/check_right.gif" /><{$lang.pass_th}>
			 <{else}>
				<img src="<{$config.weburl}>/image/default/no_right.gif" /><{$lang.not_pass}>
			 <{/if}>
		   </td>
	  </tr>
	  <tr height="22">
		<td width="80"><{$lang.user_g}></td>
		<td width="*"><{$cominfo.grouplogo}>&nbsp;&nbsp;[<a href="<{$config.weburl}>/main.php?menu=user&action=m&m=friend&s=admin_friends&friendid=<{$cominfo.userid}>"><{$lang.add_friend}></a>]</td>
	  </tr>
	  <tr height="22">
		<td><{$lang.cont}></td>
		<td><{$cominfo.contact}>  <{if $cominfo.qq!=''}>
			 <a href="tencent://message/?uin=<{$cominfo.qq}>&Site=<{$config.weburl}>&Menu=yes">
			 <img align="absmiddle" border="0" src="http://wpa.qq.com/pa?p=1:<{$cominfo.qq}>:4" /></a>
			 <{/if}>

			<{if $cominfo.msn!=''}>
			<a href="msnim:chat?contact=<{$cominfo.msn}>">
			<img align="absmiddle" src="<{$config.weburl}>/image/default/ico_msn.gif" width="16" height="16"/></a>
			<{/if}>

			<{if $cominfo.skype!=''}>
			<a href="skype:<{$cominfo.skype}>?call">
			<img align="absmiddle" border="0" src="<{$config.weburl}>/image/default/skypeonline.png"></a>
			<{/if}></td>
	  </tr>
	  <tr height="22">
		<td><{$lang.tel}></td>
		<td><{$cominfo.tel}></td>
	  </tr>
	  <tr height="22">
		<td><{$lang.fax}></td>
		<td><{$cominfo.fax}></td>
	  </tr>
	  <tr height="22">
		<td><{$lang.mobile}></td>
		<td><{$cominfo.mobile}></td>
	 <tr height="22">
		<td><{$lang.pro_city}></td>
		<td><{$cominfo.province}><{$cominfo.city}></td>
	  </tr>
	  <tr height="22">
		<td><{$lang.addr}></td>
		<td><{$cominfo.addr}></td>
	  </tr>
	</table>
	   <{/if}>
   </div>
				<div class="clear"></div>
			</div>
			<div class="right1 m1">
				<div class="sectitle" >
					<div class="title_left1 L2"><{$lang.same_pro}></div>
                    <div class="more"></div>
		        </div>
				 <div class="seccon" id="pro_list">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <{foreach item=list from=$sameoffer}>
                      <tr>
                        <td>
                        	<a href="<{geturl type='offer_detail' user=$list.user uid=$list.userid tid=$list.id m='offer'}>">
                            <b><{$list.title|truncate:20:"...":true}></b>
                            </a>
                        </td>
                        <td width="50">[<{$list.province}>]</td>
                      </tr>
                       <tr>
                        <td colspan="2" class="line">
                        <{$list.company|truncate:24:"...":true}><br /><{$list.tel}>
                        </td>
                      </tr>
                     <{/foreach}>
                    </table>
			    </div>
			  	<div class="bottom5"></div>
				</div>

</div>		
<!--右边结束-->
</div>